﻿using System;

namespace NMemcached.Client
{
    /// <summary>
    /// Defines the possible response codes from a Memcached operation
    /// </summary>
    public enum ResponseCode : ushort
    {
        /// <summary>
        /// Inicates no error has occured
        /// </summary>
        NoError = 0x0,
        /// <summary>
        /// Inicates that an operation that requires an existing item could not find the key
        /// </summary>
        KeyNotFound = 0x0001,
        /// <summary>
        /// Inicates that an entry already exists in the cache
        /// </summary>
        KeyExists = 0x0002,
        /// <summary>
        /// Indicates the value to be cached exceeds the size limit
        /// </summary>
        ValueTooLarge = 0x0003,
        /// <summary>
        /// Indicates that a command was sent with invalid arguments
        /// </summary>
        InvalidArguments = 0x0004,
        /// <summary>
        /// Indicates that an item was not stored in the cache
        /// </summary>
        ItemNotStored = 0x0005,
        /// <summary>
        /// Indicates that the client has attempted to increment or decrement a non-numeric value
        /// </summary>
        IncDecNonNumber = 0x0006,
        /// <summary>
        /// Indicates an unknown command was sent to the server
        /// </summary>
        UnknownCommand = 0x0081,
        /// <summary>
        /// Indicates that the server has run out of memory
        /// </summary>
        OutOfMemory = 0x0082
    };
}